<template>
  <div class="points">
    <div class="icon">
      <img
        @click="goPersonal"
        class="iconleft"
        src="../../../components/My/image/weibiaoti.png"
        alt=""
      />
      <h1>积分中心</h1>
      <img
        @click="goPointsrules"
        class="iconright"
        src="../../../components/My/image/jifen_icon_guize.png"
        alt=""
      />
    </div>
    <div class="picture">
      <div class="imgbox">
        <img
          src="../../../components/My/image/gerenzhuye_icon_touxiang.png"
          alt=""
        />
      </div>
      <div class="jifen">
        <span>我的积分：</span>
        <strong>520</strong>
        <img
          @click="goPointsdetails"
          class="jianfenimg"
          src="../../../components/My/image/jifen_icon_jiantou.png"
          alt=""
        />
      </div>
    </div>
    <div class="signIn">
      <div class="signInDay">
        <span>已经连续签到：<strong>1</strong>天</span
        ><img
          class="signInDayimg"
          src="../../../components/My/image/jifen_icon_zhuyishixiang.png"
          alt=""
        />

        <van-cell-group class="van">
          <van-switch-cell v-model="checked" />
        </van-cell-group>
        <b>签到提醒</b>
      </div>
      <div class="remind">每连续签到7天获得额外10积分</div>
      <ul class="pointsCheck">
        <li @click="oncla">
          <div class="checkbox">
            <span>1积分</span
            ><img
              src="../../../components/My/image/jifen_icon_duigou.png"
              alt=""
            />
          </div>
          <p>1天</p>
        </li>
        <li @click="onclb">
          <div class="checkbox">
            <span>2积分</span
            ><img
              src="../../../components/My/image/jifen_icon_duigou.png"
              alt=""
            />
          </div>
          <p>2天</p>
        </li>
        <li @click="onclc">
          <div class="checkbox">
            <span>3积分</span
            ><img
              src="../../../components/My/image/jifen_icon_jifen.png"
              alt=""
            />
          </div>
          <p>4天</p>
        </li>
        <li @click="oncld">
          <div class="checkbox">
            <span>4积分</span
            ><img
              src="../../../components/My/image/jifen_icon_jifen.png"
              alt=""
            />
          </div>
          <p>5天</p>
        </li>
        <li @click="oncle">
          <div class="checkbox">
            <span>5积分</span
            ><img
              src="../../../components/My/image/jifen_icon_jifen.png"
              alt=""
            />
          </div>
          <p>5天</p>
        </li>
        <li @click="onclf">
          <div class="checkbox">
            <span>6积分</span
            ><img
              src="../../../components/My/image/jifen_icon_jifen.png"
              alt=""
            />
          </div>
          <p>6天</p>
        </li>
        <li @click="onclg">
          <div class="checkbox">
            <span>7积分</span
            ><img
              src="../../../components/My/image/jifen_icon_jifen.png"
              alt=""
            />
          </div>
          <p>7天</p>
        </li>
      </ul>
    </div>
    <div class="goodTuff">
      <div class="goodleft">好物兑换</div>
      <div class="goodright">
        <span>全部</span
        ><img
          src="../../../components/My/image/jifen_icon_jiantou2.png"
          alt=""
        />
      </div>
    </div>
    <ul class="tuffImg">
      <li @click="dialoga">
        <img src="../../../components/My/image/jifen_icon_photo.png" alt="" />
        <span>小迷糊水感隔离…</span>
        <p><b>999</b>积分</p>
        <strong class="cankao">参考价<del>¥59.9</del></strong>
      </li>
      <li @click="dialogb">
        <img src="../../../components/My/image/jifen_icon_photo2.png" alt="" />
        <span>体脂秤—需下载…</span>
        <p><b>299</b>积分</p>
        <strong class="cankao">参考价<del>¥199</del></strong>
      </li>
      <li @click="dialogc">
        <img src="../../../components/My/image/jifen_icon_photo3.png" alt="" />
        <span>泊泉雅洋甘菊护…</span>
        <p><b>199</b>积分</p>
        <strong class="cankao">参考价<del>¥39.9</del></strong>
      </li>
    </ul>
    <div class="goodTuff">
      <div class="goodleft">普通任务</div>
    </div>
    <ul class="ordinary">
      <li>
        <img src="../../../components/My/image/jifen_icon_zhihu.png" alt="" />
        <div class="orcount">
          <span>知乎任务</span><b>2积分/次</b>
          <span>今日剩余30次</span>
        </div>
        <div class="orbtn">
          <van-button class="vatbtn" plain type="info" round>完成</van-button>
        </div>
      </li>
      <li>
        <img
          src="../../../components/My/image/jifen_icon_xiaohogshu.png"
          alt=""
        />
        <div class="orcount">
          <span>知乎任务</span><b>2积分/次</b>
          <span>今日剩余30次</span>
        </div>
        <div class="orbtn">
          <van-button class="vatbtn" plain type="info" round>完成</van-button>
        </div>
      </li>
      <li>
        <img src="../../../components/My/image/jjfen_icon_weibo.png" alt="" />
        <div class="orcount">
          <span>知乎任务</span><b>2积分/次</b>
          <span>今日剩余30次</span>
        </div>
        <div class="orbtn">
          <van-button class="vatbtn" plain type="info" round>完成</van-button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import { Dialog } from "vant";

export default {
  data() {
    return {
      checked: true,
      show: false,
    };
  },
  methods: {
    goPersonal() {
      this.$router.push({ path: "personal" });
    },
    goPointsrules() {
      this.$router.push({ path: "pointsrules" });
    },
    /* 积分明细 */
    goPointsdetails() {
      this.$router.push({ path: "pointsdetails" });
    },
    // Dialog({ message: '提示' })
    oncla() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    onclb() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    onclc() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    oncld() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    oncle() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    onclf() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    onclg() {
      Dialog.alert({
        // title: "标题",
        message: "签到成功",
      }).then(() => {
        // on close
      });
    },
    dialoga() {
      Dialog.confirm({
        message: "是否要兑换以下产品？",
      })
        .then(() => {
          // on confirm
        })
        .catch(() => {
          // on cancel
        });
    },
    dialogb() {
      Dialog.confirm({
        message: "是否要兑换以下产品？",
      })
        .then(() => {
          // on confirm
        })
        .catch(() => {
          // on cancel
        });
    },
    dialogc() {
      Dialog.confirm({
        message: "是否要兑换以下产品？",
      })
        .then(() => {
          // on confirm
        })
        .catch(() => {
          // on cancel
        });
    },
  },
};
</script>

<style lang="scss">
* {
  padding: 0;
  margin: 0;
}
.points {
  width: 750px;
  height: 1624px;
  background: #f5f5f5;
  .picture {
    /* width: 168px; */
    /* background: red; */
    height: 126px;
    margin-bottom: 20px;
  }
  .icon {
    margin-left: 42px;
    height: 162px;
    line-height: 48px;
    padding-top: 114px;
    margin-right: 32px;
  }
  .icon .iconleft {
    float: left;
    width: 30px;
    height: 30px;
    display: block;
    margin: 9px 0px;
  }
  .icon .iconright {
    float: right;
    width: 30px;
    height: 30px;
    display: block;
    margin: 9px 0px;
  }
  .icon h1 {
    float: left;
    width: 200px;
    height: 48px;
    position: relative;
    left: 275px;
    font-size: 35px;
  }
  .picture {
    margin-top: 62px;
    margin-left: 42px;
  }
  .imgbox {
    float: left;
  }
  .jifen {
    width: 200px;
    float: left;
    font-size: 24px;
    line-height: 126px;
    margin-left: 16px;
    position: relative;
  }
  .jianfenimg {
    position: absolute;
    float: right;
    display: block;
    width: 19px;
    height: 19px;
    top: 50%;
    right: 0;
    margin-top: -9.5px;
    margin-left: -9.5px;
  }
  .signIn {
    width: 710px;
    height: 282px;
    margin: 0px 20px;
    background: #bbd2f4;
    color: #ffffff;
    margin-bottom: 48px;
  }
  .signInDay {
    padding-top: 19px;
    width: 100%;
    height: 53px;
    // line-height: 53px;
    // background: gold;
    font-size: 24px;
  }
  .signInDay b {
    float: right;
  }
  .signInDayimg {
    // float: left;
    // display: block;
    margin-left: 20px;
  }
  .van {
    float: right;
    width: 82px;
    height: 1.75rem;
  }
  .van-cell {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    padding: 0.625rem 1rem;
    overflow: hidden;
    color: #323233;
    font-size: 0.875rem;
    line-height: 1.5rem;
    background-color: rgba(255, 255, 255, 0);
  }
  .van-cell-group {
    background-color: rgba(255, 255, 255, 0);
  }
  .van-hairline--top-bottom::after,
  .van-hairline-unset--top-bottom::after {
    border-width: 0;
  }
  .remind {
    font-size: 20px;
    margin-bottom: 25px;
  }
  .pointsCheck {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
  }
  .pointsCheck li {
    text-align: center;
    width: 78px;
    height: 142px;
    font-size: 20px;
  }
  .pointsCheck span {
    padding: 20px 10px;
    display: block;
  }
  .checkbox {
    background: #90b6ef;
    margin-bottom: 4px;
  }
  .checkbox span {
    font-size: 20px;
  }
  .pointsCheck img {
    // margin-top: 20px;
    margin: 18px 25px 0px 25px;
    width: 24px;
    height: 24px;
  }
  .van-icon-arrow:before {
    content: "";
  }
  .van-cell {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    padding: 0;
    overflow: hidden;
    color: #323233;
    font-size: 0.875rem;
    line-height: 1.5rem;
    background-color: rgba(255, 255, 255, 0);
  }
  .van-cell::after {
    position: "";
    box-sizing: border-box;
    content: " ";
    pointer-events: none;
    right: 1rem;
    bottom: 0;
    left: 1rem;
    border-bottom: 0.0625rem solid #ebedf0;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
  }
  .goodTuff {
    width: 622px;
    height: 40px;
    margin-left: 27px;
    margin-right: 88px;
    line-height: 40px;
    margin-bottom: 26px;
    font-weight: bold;
  }
  .goodleft {
    width: 112px;
    height: 40px;
    float: left;
    font-size: 28px;
    color: #2f2f2f;
  }
  .goodright {
    width: 68px;
    height: 40px;
    float: right;
  }
  .goodright span {
    width: 44px;
    height: 30px;
    font-size: 22px;
    margin-right: 14px;
  }
  .tuffImg {
    width: 750px;
    height: 348px;
    margin: 0 auto;
    // background: #90b6ef;
    padding: 0px 32px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-bottom: 46px;
  }
  .tuffImg li {
    width: 216px;
    height: 348px;
    background: #ffffff;
    border-radius: 10px 10px 10px 10px;
  }
  .tuffImg li img {
    width: 216px;
    height: 208px;
  }
  .tuffImg li span {
    display: block;
    text-align: center;
    height: 33px;
    font-size: 24px;
    margin-left: 10px;
  }
  .tuffImg li p {
    margin: 3px 0px 3px 10px;
    width: 120px;
    height: 56px;
    line-height: 56px;
    font-size: 16px;
    color: #ff6770;
  }
  .tuffImg li p b {
    font-size: 30px;
  }
  .tuffImg li .cankao {
    width: 120px;
    height: 28px;
    margin-left: 10px;
    font-size: 20px;
    font-weight: normal;
    color: #666666;
  }
  .ordinary {
    margin: 20px auto;
    width: 710px;
    height: 350px;
    background: #ffffff;
    border-radius: 10px 10px 10px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  .ordinary li {
    // background: #ff6770;
    width: 645px;
    height: 88px;
  }
  .ordinary li img {
    float: left;
    width: 88px;
    height: 88px;
    margin-right: 30px;
    // border-style: dashed;
  }
  .orcount {
    width: 206px;
    height: 88px;
    float: left;
  }
  .orcount b {
    width: 82px;
    height: 44px;
    line-height: 44px;
    font-weight: normal;
    float: left;
    color: #accfff;
    margin-left: 20px;
  }
  .orcount:first-child {
    font-weight: bold;
  }
  .orcount span {
    font-size: 24px;
    float: left;
    height: 44px;
    line-height: 44px;
  }
  .orbtn {
    // position: absolute;
    width: 102px;
    height: 88px;
    float: right;
    position: relative;
  }
  .vatbtn {
    position: absolute;
    top: 20px;
    left: 20px;
  }
}
</style>
